﻿#pragma strict

static var dinheiro : int = 2000;
static var deposito : int = 10;
var texturaBotao : Texture2D = null;
var maquina : GameObject;
var texturaMoeda : Texture2D = null;
var styleTextAreaMoeda : GUIStyle;
var styleBoxMoeda : GUIStyle;
var comprado : boolean;
var texturaCursor : Texture2D;
var cursorSelecionado : boolean;
private var mousePosition : Vector3;
private var colidiu : boolean = false;

function Start () {
	comprado=false;
	cursorSelecionado=false;
}

function Update () {
   
	 
}

function OnGUI()
{
    var width = Screen.width;
    var height = Screen.height;

	GUI.Box (new Rect (0,0,width,30),"");
	GUI.TextArea(Rect(0,0,70,30), dinheiro.ToString(),styleTextAreaMoeda);
	GUI.Box(Rect(75,0,30,30),texturaMoeda,styleBoxMoeda);
	GUI.TextArea(Rect(110,0,30,30), deposito.ToString(),styleTextAreaMoeda);
	/*if(GUI.Button(Rect(width-70,0,70,30),texturaBotao,GUIStyle.none) && !Maquina.seguindo)
 	{	 	
		if(dinheiro >= 150)
		{		
		    dinheiro = dinheiro - 150;		    
		    var maquina = Instantiate(maquina,mousePos,Quaternion.identity);
		    comprado=true;
		    object = maquina;
		    Maquina.object = maquina;
		    Maquina.Seguir();
		}
		else
		{
			Debug.Log("Nao tem dinheiro suficiente");
		}
 	}
	if(Input.GetMouseButton(0) && comprado==true && !Maquina.colide)
 	{
	    Maquina.Parar();
	}*/	
	//GUI.EndGroup ();
}
